﻿// MIT License
// 开源地址：https://gitee.com/co1024/AbcMvc
// Copyright (c) 2021-2022 1024
// Abc.Mvc=Furion+EF+SqlSugar+Pear layui admin.

namespace Abc.Core.Entities;

/// <summary>
/// 邮件模板
/// </summary>
[Comment("邮件模板")]
[Table("Sys_EmailTemplate")]
public class EmailTemplate : FullEntity, IExtensionData, IEntityTypeBuilder<EmailTemplate>
{
    /// <summary>
    /// Json数据 <see cref="Dictionary<string,object>"/>
    /// </summary>
    [Comment("Json数据")]
    public string ExtensionData { get; set; }

    /// <summary>
    /// 邮件模板类型
    /// </summary>
    [Comment("邮件模板类型")]
    public EmailTemplateType TemplateType { get; set; }

    /// <summary>
    /// 是否启用.
    /// </summary>
    [Comment("是否启用")]
    public bool IsEnable { get; set; }

    /// <summary>
    /// 邮件标题
    /// </summary>
    [Comment("邮件标题")]
    [MaxLength(500)]
    public string Title { get; set; }

    /// <summary>
    /// 邮件内容
    /// </summary>
    [Comment("邮件内容")]
    public string Content { get; set; }

    /// <summary>
    /// 出版社接收邮箱
    /// </summary>
    [Comment("出版社接收邮箱")]
    public string PressReceiveEmail { get; set; }

    #region ref

    /// <summary>
    /// 表ID
    /// </summary>
    [Comment("表ID")]
    public int? TableId { get; set; }

    #endregion ref

    public void Configure(EntityTypeBuilder<EmailTemplate> entityBuilder, DbContext dbContext, Type dbContextLocator)
    {
    }
}
